<?php

class FileTypeChecker
{
	public static function isPhotoType($type)
	{
		if($type == 'image/jpeg')
			return true;
		if($type == 'image/gif')
			return true;
		if($type == 'image/png')
			return true;
		if($type == 'image/pjpeg')
			return true;
		return false;
	}
	
	public static function getFileExtension($type)
	{
		if($type == 'image/jpeg')
			return 'jpg';
		if($type == 'image/gif')
			return 'gif';
		if($type == 'image/png')
			return 'png';
		if($type == 'image/pjpeg')
			return 'jpg';
		return null;
	}
}

?>